﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _61属性
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Student s1 = new Student(15);
            Console.WriteLine(s1.Age);//获取
            s1.Age = 17;//设置

            Player p = new Player();//自动属性,按F12查看Player中的定义

            DateTime dt1 = DateTime.Now;//表面上看now是一个数据,其实是调用方法从操作系统获取的时间
            Console.WriteLine(dt1);
            Console.WriteLine(dt1.Year);
        }
    }
}